package 集合框架;

import java.util.Scanner;

public class zhuc {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        System.out.println("请输入注册用户名");
        String m = input.next();
        System.out.println("请输入注册密码");
        String n = input.next();
        System.out.println("请输入重新输入密码");
        String n2 = input.next();
        if (!n.equals(n2)){
            System.out.println("两次密码输入不一样");
        }
        if (m.length()<3&&n.length()<6){
            System.out.println("密码长度不能小于6-用户名长度不能小于3");
        }else {
            System.out.println("请输入用户名");
            String m1 = input.next();
            System.out.println("请输入密码");
            String n1 = input.next();

            if (m1.length()>=3&&n1.length()>=6){
                if (m1.equals(m)&&n1.equals(n)){
                    System.out.println("登陆成功");
                }else{
                    System.out.println("用户名或密码输入错误");
                }
            }else{
                System.out.println("密码长度不能小于6-用户名长度不能小于3");
            }
        }

    }
}
